-
Notifications
You must be signed in to change notification settings - Fork 285
Cleanup error handling in solvers/qbf #2961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
allredj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed Diffblue compatibility checks (cbmc commit: 6a24c2c).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/84858721
src/solvers/qbf/qbf_bdd_core.cpp
Outdated
| { | ||
| assert(false); | ||
| UNREACHABLE; | ||
| return tvt(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this required here and not below, eg in m_get?
src/solvers/qbf/qbf_bdd_core.cpp
Outdated
| { | ||
| INVARIANT( | ||
| it->type == quantifiert::UNIVERSAL, | ||
| "Only handles quantified variables."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start with lower case (several occurrences)
|
Lower cases and full stops fixed, redundant return statements removed. |
allredj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed Diffblue compatibility checks (cbmc commit: fb13b74).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85159051
src/solvers/qbf/qbf_bdd_core.cpp
Outdated
|
|
||
| assert(model_bdds[l.var_no()]!=NULL); | ||
| INVARIANT( | ||
| model_bdds[l.var_no()] != NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While at it: please use nullptr instead of NULL
| #include <cassert> | ||
| #include <cstdlib> | ||
| #include <fstream> | ||
| #include <util/invariant.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit-pick: add a blank line before this include.
| #include <cassert> | ||
| #include <cstdlib> | ||
| #include <fstream> | ||
| #include <util/invariant.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit-pick: add a blank line before this include.
src/solvers/qbf/qbf_qube_core.cpp
Outdated
| #include <fstream> | ||
| #include <cstring> | ||
| #include <fstream> | ||
| #include <util/invariant.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move one line down to group with the mp_arith.h include
| #define CPROVER_SOLVERS_QBF_QBF_QUBE_CORE_H | ||
|
|
||
| #include "qdimacs_core.h" | ||
| #include <util/invariant.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit-pick: add a blank line before this include.
| #include <cassert> | ||
| #include <cstdlib> | ||
| #include <fstream> | ||
| #include <util/invariant.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit-pick: add a blank line before this include.
|
|
||
| #include <cassert> | ||
| #include <fstream> | ||
| #include <util/invariant.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit-pick: add a blank line before this include.
src/solvers/qbf/qbf_skizzo_core.cpp
Outdated
|
|
||
| if(!result) | ||
| throw "existential mapping from sKizzo missing"; | ||
| INVARIANT(!result, "existential mapping from sKizzo missing"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the negation, i.e., the invariant is result, not !result
|
|
||
| #include <iostream> | ||
| #include <cassert> | ||
| #include <util/invariant.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit-pick: add a blank line before this include.
|
Added blank lines before |
tautschnig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, please squash and rebase.
|
Squashed and rebased. |
allredj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed Diffblue compatibility checks (cbmc commit: 706a529).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85264387
No description provided.